import $http from '../../plugins/MyHttp'

export default {
    namespaced: true,
    state: {
        IntercomInfo: {},
        groupId: ''
    },
    mutations: {
        Intercom(state, res) {
            state.IntercomInfo = res
        },
        groupId(state, res) {
            state.groupId = res
        }
    },
    getters: {},
    actions: {
        IntercomInfo(context, params) {
            context.commit('groupId', params)
            $http.get('/api/threesuns/imcControl/common/mountDevs?groupId=' + params).then(res => {
                if (res.data.code == '200') {
                    context.commit('Intercom', res.data)
                }
            })
        }
    }
}